home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / SUPERPD.PAK / PADVIEW.H < prev    next >
C/C++ Source or Header  |  1997-05-06  |  3KB  |  110 lines

  1. // padview.h : interface of the CPadView class
  2. //
  3. // This is a part of the Microsoft Foundation Classes C++ library.
  4. // Copyright (C) 1992-1995 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. // This source code is only intended as a supplement to the
  8. // Microsoft Foundation Classes Reference and related
  9. // electronic documentation provided with the library.
  10. // See these sources for detailed information regarding the
  11. // Microsoft Foundation Classes product.
  12.  
  13. #ifndef __PADVIEW_H__
  14. #define __PADVIEW_H__
  15.  
  16. #include <afxdlgs.h>
  17. #include <afxext.h>
  18. #include "paddoc.h"
  19.  
  20. class CPadView : public CEditView
  21. {
  22.     DECLARE_DYNCREATE(CPadView)
  23.  
  24. // Construction
  25.     CPadView();
  26.     BOOL PreCreateWindow(CREATESTRUCT& cs);
  27.  
  28. // Attributes
  29. public:
  30.     // static init/term...
  31.     static void Initialize();
  32.     static void Terminate();
  33.  
  34.     CPadDoc* GetDocument()
  35.         { return (CPadDoc*)m_pDocument; }
  36.  
  37. // Operations
  38. public:
  39.     // Word wrap...
  40.     BOOL IsWordWrap() const;
  41.     BOOL SetWordWrap(BOOL bWordWrap);
  42.  
  43.     // Printing...
  44.     virtual void OnPrint(CDC* pDC, CPrintInfo *pInfo);
  45.     virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
  46.     virtual void OnScrollTo(CDC* pDC, CPrintInfo* pInfo, POINT point);
  47.  
  48.     // Buffer access...
  49.     LPCTSTR LockBuffer() const
  50.         { return CEditView::LockBuffer(); }
  51.     void UnlockBuffer() const
  52.         { CEditView::UnlockBuffer(); }
  53.  
  54. // Implementation
  55. public:
  56.     BOOL IsUpdatePending() {return (m_uTimerID != NULL);}
  57.  
  58. #ifdef _DEBUG
  59.     virtual void AssertValid() const;
  60.     virtual void Dump(CDumpContext& dc) const;
  61. #endif
  62.  
  63. protected:
  64.     UINT m_uTimerID; // ==0 when no outstanding
  65.  
  66.     static LOGFONT NEAR m_lfDefFont;
  67.     static LOGFONT NEAR m_lfDefFontOld;
  68.     CFont m_font;
  69.  
  70.     static LOGFONT NEAR m_lfDefPrintFont;
  71.     static LOGFONT NEAR m_lfDefPrintFontOld;
  72.     CFont m_fontPrint;
  73.  
  74.     static UINT m_nDefTabStops;
  75.     static UINT m_nDefTabStopsOld;
  76.     static BOOL m_bDefWordWrap;
  77.     static BOOL m_bDefWordWrapOld;
  78.  
  79.     UINT m_nPreviewPage;
  80.     CTime m_timeHeader;
  81.     CTime m_timeFooter;
  82.  
  83.     //{{AFX_MSG(CPadView)
  84.     afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
  85.     afx_msg void OnChooseFont();
  86.     afx_msg void OnWordWrap();
  87.     afx_msg void OnUpdateWordWrap(CCmdUI* pCmdUI);
  88.     afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
  89.     afx_msg void OnChoosePrintFont();
  90.     afx_msg void OnMirrorDisplayFont();
  91.     afx_msg void OnUpdateMirrorDisplayFont(CCmdUI* pCmdUI);
  92.     afx_msg void OnUpdateChoosePrintFont(CCmdUI* pCmdUI);
  93.     afx_msg void OnSize(UINT nType, int cx, int cy);
  94.     afx_msg void OnEditChange();
  95.     afx_msg void OnEditCopy();
  96.     afx_msg void OnEditCut();
  97.     afx_msg void OnTimer(UINT nIDEvent);
  98.     //}}AFX_MSG
  99.  
  100.     #ifndef _MAC
  101.         afx_msg void OnSetTabStops();
  102.     #endif
  103.  
  104.     DECLARE_MESSAGE_MAP()
  105. };
  106.  
  107. #endif  // __PADVIEW_H__
  108.  
  109. /////////////////////////////////////////////////////////////////////////////
  110.